#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class CardRW;
class FarmerCard;
class CardReader;

#include "idcardread.h"

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    void showMsg(QString str, int t = -1);

private slots:
    void onUiEvent(int e);
    void recvMsg(int mode, QByteArray data);
    void on_btFarmerCard_clicked();

    void on_btJuanYanKa_clicked();

    void on_btTuiKa_clicked();

    void on_btTuiChu_clicked();

private:
    Ui::MainWindow *ui;
    CardRW *uiCardRW;
    FarmerCard *uiFam;

private:
    CardReader *creader;
    bool yl_isread;
    bool jy_isread;
    IDCardRead *idr;
};

#endif // MAINWINDOW_H
